<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>tests/src/vfs/extfs/helpers-list/misc/rpm/test.spec</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.5.7' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/tests.html'>tests</a>/<a href='../files/tests--src.html'>src</a>/<a href='../files/tests--src--vfs.html'>vfs</a>/<a href='../files/tests--src--vfs--extfs.html'>extfs</a>/<a href='../files/tests--src--vfs--extfs--helpers-list.html'>helpers-list</a>/<a href='../files/tests--src--vfs--extfs--helpers-list--misc.html'>misc</a>/<a href='../files/tests--src--vfs--extfs--helpers-list--misc--rpm.html'>rpm</a>/test.spec</span></li>
</ul></div>
<!-- end of fixed guide -->
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/tests.html'>tests</a>/<a href='../files/tests--src.html'>src</a>/<a href='../files/tests--src--vfs.html'>vfs</a>/<a href='../files/tests--src--vfs--extfs.html'>extfs</a>/<a href='../files/tests--src--vfs--extfs--helpers-list.html'>helpers-list</a>/<a href='../files/tests--src--vfs--extfs--helpers-list--misc.html'>misc</a>/<a href='../files/tests--src--vfs--extfs--helpers-list--misc--rpm.html'>rpm</a>/test.spec</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 tests/src/vfs/extfs/helpers-list/misc/rpm/test.spec'  /> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>#
<a id='L2' name='L2'></a># This spec file is used to build the test*.rpm package we use in one of
<a id='L3' name='L3'></a># our tests.
<a id='L4' name='L4'></a>#
<a id='L5' name='L5'></a># The advantage of using our own custom package, instead of downloading a
<a id='L6' name='L6'></a># random one from the net, is that we get the chance here to define all the
<a id='L7' name='L7'></a># tags our rpm helper is supposed to support.
<a id='L8' name='L8'></a>#
<a id='L9' name='L9'></a># Build this package with:
<a id='L10' name='L10'></a>#
<a id='L11' name='L11'></a>#    $ rpmbuild -bb test.spec
<a id='L12' name='L12'></a>#
<a id='L13' name='L13'></a># Then create the input for the test with:
<a id='L14' name='L14'></a>#
<a id='L15' name='L15'></a>#    $ perl /path/to/rpm2tags.pl ~/rpmbuild/RPMS/noarch/test*.rpm &gt; rpm.custom.input
<a id='L16' name='L16'></a>#
<a id='L17' name='L17'></a>Name:           test
<a id='L18' name='L18'></a>Summary:        Testing
<a id='L19' name='L19'></a>Epoch:          1
<a id='L20' name='L20'></a>Version:        2.3
<a id='L21' name='L21'></a>Release:        4%{?dist}
<a id='L22' name='L22'></a>URL:            http://example.com
<a id='L23' name='L23'></a>Group:          Development/System
<a id='L24' name='L24'></a>License:        MIT
<a id='L25' name='L25'></a>BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
<a id='L26' name='L26'></a>BuildArch:      noarch
<a id='L27' name='L27'></a>Conflicts:      notest
<a id='L28' name='L28'></a>Obsoletes:      testing
<a id='L29' name='L29'></a>Distribution:   Test Distro
<a id='L30' name='L30'></a>Packager:       Test Packager
<a id='L31' name='L31'></a>Vendor:         Test Vendor
<a id='L32' name='L32'></a> 
<a id='L33' name='L33'></a> 
<a id='L34' name='L34'></a>%description
<a id='L35' name='L35'></a>Multi-line description field
<a id='L36' name='L36'></a>with "double", 'single quotes', and $weird | \characters i\n = i\\t, empty line...
<a id='L37' name='L37'></a> 
<a id='L38' name='L38'></a>...and a tab: [ ].
<a id='L39' name='L39'></a> 
<a id='L40' name='L40'></a>%install
<a id='L41' name='L41'></a>[ "%{buildroot}" != / ] &amp;&amp; %{__rm} -rf "%{buildroot}"
<a id='L42' name='L42'></a>%{__mkdir_p} %{buildroot}%{_tmppath}
<a id='L43' name='L43'></a>echo %{name} &gt; %{buildroot}%{_tmppath}/%{name}.txt
<a id='L44' name='L44'></a> 
<a id='L45' name='L45'></a> 
<a id='L46' name='L46'></a>%pretrans
<a id='L47' name='L47'></a>echo "Pre-transaction script"
<a id='L48' name='L48'></a> 
<a id='L49' name='L49'></a> 
<a id='L50' name='L50'></a>%pre
<a id='L51' name='L51'></a>echo "Pre-installation script"
<a id='L52' name='L52'></a> 
<a id='L53' name='L53'></a> 
<a id='L54' name='L54'></a>%post
<a id='L55' name='L55'></a>echo "Post-installation script"
<a id='L56' name='L56'></a> 
<a id='L57' name='L57'></a> 
<a id='L58' name='L58'></a>%preun
<a id='L59' name='L59'></a>echo "Pre-uninstallation script"
<a id='L60' name='L60'></a> 
<a id='L61' name='L61'></a> 
<a id='L62' name='L62'></a>%postun
<a id='L63' name='L63'></a>echo "Post-uninstallation script"
<a id='L64' name='L64'></a> 
<a id='L65' name='L65'></a> 
<a id='L66' name='L66'></a>%posttrans
<a id='L67' name='L67'></a>echo "Post-transaction script"
<a id='L68' name='L68'></a> 
<a id='L69' name='L69'></a> 
<a id='L70' name='L70'></a>%verifyscript
<a id='L71' name='L71'></a>echo "Verify script"
<a id='L72' name='L72'></a> 
<a id='L73' name='L73'></a> 
<a id='L74' name='L74'></a>%clean
<a id='L75' name='L75'></a>[ "%{buildroot}" != / ] &amp;&amp; %{__rm} -rf "%{buildroot}"
<a id='L76' name='L76'></a> 
<a id='L77' name='L77'></a> 
<a id='L78' name='L78'></a>%files
<a id='L79' name='L79'></a>%defattr(-,root,root,-)
<a id='L80' name='L80'></a>%{_tmppath}/%{name}.txt
<a id='L81' name='L81'></a> 
<a id='L82' name='L82'></a> 
<a id='L83' name='L83'></a>%changelog
<a id='L84' name='L84'></a>* Fri Dec 30 2016 Jiri Tyr &lt;jiri.tyr at gmail.com&gt; 1:2.3-4
<a id='L85' name='L85'></a>- Initial build.
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+85 tests/src/vfs/extfs/helpers-list/misc/rpm/test.spec'  /> */</em>
</body>
</html>
